package Demo10;

import Demo03.User;
import Demo03.UserDAO;
import Demo03.UserDAOImpl;
import com.opensymphony.xwork2.ActionSupport;

import java.util.ArrayList;
import java.util.List;

public class UserList extends ActionSupport {
    private List<User> list = new ArrayList<>();

    public List<User> getList() {
        return list;
    }

    @Override
    public String execute() throws Exception {
        UserDAO userDAO=new UserDAOImpl();
        list=userDAO.selAll();
        return SUCCESS;
    }
}
